package com.nitty.cash.loop.sdk.device.http

import com.nitty.cash.loop.sdk.device.NittyDeviceSycBuilder


object NittyDeviceUrlHelper {

    fun combineUrl(): String {
        if (NittyDeviceSycBuilder.host.isBlank() or NittyDeviceSycBuilder.zone.isBlank() or NittyDeviceSycBuilder.pathCommon.isBlank()) {
            return ""
        }

        val zone = NittyDeviceSycBuilder.zone
        NittyDeviceSycBuilder.zone = zone.replace("/", "")

        val pathCommon = NittyDeviceSycBuilder.pathCommon
        NittyDeviceSycBuilder.pathCommon = pathCommon.replace("/", "")

        return NittyDeviceSycBuilder.host + "/" + NittyDeviceSycBuilder.zone + "/" + NittyDeviceSycBuilder.pathCommon
    }
}